package org.filecollector.filecontroller.virtualcatalogue.groupname;

/**
 * Name class for catalogues
 * @see GroupNameClass
 */
public interface GroupName extends Cloneable, Comparable<GroupName> {
    /**
     * check can be this id part of directory
     * @param id id of file
     * @return true if id matches
     */
    boolean matchesId(Long id);

    /**
     * @return name of directory
     */
    String getName();

    /**
     * @return true if this diapason includes {@code another} ones
     */
    public boolean includes(GroupName another);

    /**
     * @return name in format "name"
     */
    String toJSONElement();

    /**
     * @param name other group name
     * @return true if ranges is intersecting
     */
    boolean isIntersected(GroupName name);

    /**
     * @return minimal possible id
     */
    Long getMinId();

    /**
     * @return maximal possible id
     */
    Long getMaxId();
}
